package com.hqd.ch03.v50.boot;

public interface SpringApplicationShutdownHandlers {

    /**
     * Add an action to the handlers that will be run when the JVM exits.
     *
     * @param action the action to add
     */
    void add(Runnable action);

    /**
     * Remove a previously added an action so that it no longer runs when the JVM exits.
     *
     * @param action the action to remove
     */
    void remove(Runnable action);

}
